<div id="xray-bar" style="display:none">
  <% if Xray.request_info.present? %>
    <div id="xray-bar-controller-path">
      <% if Xray.request_info[:controller] %>
        <span class="xray-bar-btn xray-bar-controller xray-icon-flash" data-path="<%= Xray.request_info[:controller][:path] %>">
          <b></b>
          <%= Xray.request_info[:controller][:name] %><span class="xray-bar-controller-action">#<%= Xray.request_info[:controller][:action] %></span>
        </span>
      <% end %>
      <% if Xray.request_info[:view] && Xray.request_info.fetch(:controller, {})[:name] != "Rails::InfoController" %>
        <% layout_path = lookup_context.find(Xray.request_info[:view][:layout]).identifier %>
        <span class="xray-bar-btn xray-bar-layout xray-icon-columns" data-path="<%= layout_path %>">
          <b></b>
          <%= layout_path.split('/').last %>
        </span>
        <span class="xray-bar-btn xray-bar-view xray-icon-doc" data-path="<%= Xray.request_info[:view][:path] %>">
          <%= Xray.request_info[:view][:path].split('/').last %>
        </span>
      <% end %>
    </div>
  <% end %>
  <div id="xray-bar-togglers">
    <span class="xray-bar-btn xray-bar-all-toggler xray-icon-search"></span>
    <span class="xray-bar-btn xray-bar-templates-toggler">
      templates
    </span>
    <span class="xray-bar-btn xray-bar-views-toggler">
      views
    </span>
  </div>
  <span class="xray-bar-settings-btn xray-icon-cog"></span>
  <div id="xray-settings" style="display:none">
    <form>
      <label for="xray-editor-input">Editor</label>
      <input id="xray-editor-input" type="text" value="<%= Xray.config.editor %>">
      <button type="submit">Save</button>
      <p>Settings are saved to <%= Xray.config.config_file %></p>
  </form>
  </div>
  <%= stylesheet_link_tag :xray %>
</div>
